package com.example.chamberlainserver.event;

import org.springframework.context.ApplicationEvent;

public class AuthenticationResultEvent extends ApplicationEvent {
    private final String username;
    private final String token;
    private final boolean success;
    private final String errorMessage;
    
    public AuthenticationResultEvent(Object source, String username, String token, boolean success, String errorMessage) {
        super(source);
        this.username = username;
        this.token = token;
        this.success = success;
        this.errorMessage = errorMessage;
    }
    
    // Getters
    public String getUsername() {
        return username;
    }
    
    public String getToken() {
        return token;
    }
    
    public boolean isSuccess() {
        return success;
    }
    
    public String getErrorMessage() {
        return errorMessage;
    }
}